'use strict';
import Vue from 'vue';

console.log("hhh,我来了");

//mint-ui
// import mintUI from "mint-ui";
// Vue.use(mintUI);
// mint-ui 按需引入 开始
import Header from 'mint-ui/lib/header';
import Switch from 'mint-ui/lib/switch';
import Swipe from 'mint-ui/lib/swipe';
import SwipeItem from 'mint-ui/lib/swipe-item';
import Lazyload from 'mint-ui/lib/lazyload';
import Loadmore from 'mint-ui/lib/loadmore';
import Indicator from 'mint-ui/lib/indicator';
import Button from 'mint-ui/lib/button';
Vue.component(Header.name, Header);
Vue.component(Switch.name, Switch);
Vue.component(Swipe.name, Swipe);
Vue.component(SwipeItem.name, SwipeItem);
Vue.component(Loadmore.name, Loadmore);
Vue.component(Button.name, Button);
Vue.use(Lazyload);
// mint-ui 按需引入 结束

import  "mint-ui/lib/style.css";
//mui
import "./static/lib/mui/css/mui.css";

import VueRouter from "vue-router";
Vue.use(VueRouter);
import router from "./router.js";
import "./static/css/index.css"

import Axios from "axios";
Axios.defaults.baseURL="http://127.0.0.1:2000/";
Vue.prototype.Ajax=Axios;

// 导入图片预览vue-preview
import vuePreview from "vue-preview";
Vue.use(vuePreview);

// 拦截器
Axios.interceptors.request.use(config=>{
    //显示图标
    Indicator.open({
        text: '',
        spinnerType: 'fading-circle'
    });
    return config;
})
Axios.interceptors.response.use(config=>{
    Indicator.close();
    return config;
})

import moment from "moment";
Vue.filter("DataFormat",function (data) {
    // console.log(moment(data).format(\"YY-MM-DD"));
    return moment(data).format("YYYY-MM-DD");
})

import navBar from "./components/navBar.vue";
Vue.component("navBar",navBar);
import pinglun from "./components/pinglun.vue";
Vue.component("pingLun",pinglun);

import App from './app.vue';

new Vue({
    el:"#app",
    data:{},
    render:c=>c(App),
    router
})